Skip to content

feat: disambiguate local users from SSO users in RBAC with strict mode#28233

Open
christianh814 wants to merge 5 commits into
argoproj:masterfrom
christianh814:feat/unambiguate-local-users
Open

feat: disambiguate local users from SSO users in RBAC with strict mode#28233
christianh814 wants to merge 5 commits into
argoproj:masterfrom
christianh814:feat/unambiguate-local-users

Conversation

@christianh814

@christianh814 christianh814 commented Jun 10, 2026

Copy link
Copy Markdown
Member

Fixes #26795

Adds an opt-in feature flag that disambiguates local accounts from SSO users during RBAC enforcement, resolving the ambiguous group assignment problem described HERE.

When rbac.local.user.strictmode: "true" is set in the argocd-cm ConfigMap, Argo CD appends an @local suffix to local account names during RBAC enforcement only. This prevents an SSO user whose scope happens to match a local user's name from inheriting that local user's roles.

Behavior summary:

  • Reference local users in RBAC policies with the suffix, e.g. g, sally@local, role:developer.
  • Users still log in as sally (CLI/UI) , the @local suffix only affects RBAC matching.
  • The UI user info section displays the @local identity when strict mode is on, so operators know which subject to reference.
  • The built-in admin account is granted role:admin for both admin and admin@local, preserving default admin access.
  • This is disabled by default. When unset, local names are matched verbatim (existing behavior is unchanged).

TL;DR

When you create a local user like this with this setting:

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
data:
  rbac.local.user.strictmode: "true" # New option, defaults to "false" preserving current behavior
  accounts.sally: apiKey,login

You have to do this for RBAC now:

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-rbac-cm
  namespace: argocd
data:  # Note the @local is needed now ⌄
  policy.csv: |
    g, sally@local, role:admin
  policy.default: role:readonly
  scopes: '[groups, email]'

…entiate between local users and SSO users

Signed-off-by: Christian Hernandez <christian@chernand.io>
@christianh814 christianh814 requested review from a team as code owners June 10, 2026 22:10
@bunnyshell

bunnyshell Bot commented Jun 10, 2026

Copy link
Copy Markdown

❗ Preview Environment stop on Bunnyshell failed

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop again the environment
  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@christianh814 christianh814 changed the title (feat): Added the ability to disambiguate local users so that RBAC can differentiate between local users and SSO users feat: disambiguate local users from SSO users in RBAC with strict mode Jun 10, 2026
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 8 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
argo-cd-ui-array-push 10.67MB -8 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: argo-cd-ui-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
main.*.js -8 bytes 3.46MB -0.0%

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@08e959d). Learn more about missing BASE report.
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #28233   +/-   ##
=========================================
  Coverage          ?   64.77%           
=========================================
  Files             ?      424           
  Lines             ?    58728           
  Branches          ?        0           
=========================================
  Hits              ?    38040           
  Misses            ?    17154           
  Partials          ?     3534           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

<h4>Update account password</h4>
<Form
onSubmit={(params: PasswordFormData) => changePassword(userInfo.username, params.currentPassword, params.newPassword)}
onSubmit={(params: PasswordFormData) => changePassword('', params.currentPassword, params.newPassword)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a UI expert but is this change correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The panel only renders for the logged-in local user (iss === 'argocd'), so this is always a self-service password change.

Passing an empty name tells the backend's UpdatePassword to resolve the account from the authenticated token instead of a client-supplied name. This is needed because the new strict mode now displays userInfo.username as sally@local (for example), which would no longer match the real account name (e.g. sally) and would break the update.

Empty name is correct in both strict and non-strict modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Ambigous Group Assignments for Local Users

2 participants